function y = engval1(x)
% ENGVAL1 function
% x0=[2,2,...,2];
n=length(x);
tp1=0;tp2=0;y=0;
for i=1:(n-1)
    tp1=tp1+((x(i))^2+(x(i+1))^2)^2;
    tp2=tp2-4*x(i)+3;
end
y=y+tp1+tp2;


